dhcpv4: don't send zero IPv6-only preferred option
authorDavid Härdeman <[email protected]>
Tue, 9 Dec 2025 08:21:11 +0000 (09:21 +0100)
committerÁlvaro Fernández Rojas <[email protected]>
Tue, 9 Dec 2025 14:07:53 +0000 (15:07 +0100)
commit00f2d7a4dbe5351f74e77cb3636897dc20ecb30b
tree3939f3b069deb527faba9ffb525350f935d2e626
parentc86d29bb83d6e89b4ffe49fa4155c3e1746b6b8e
dhcpv4: don't send zero IPv6-only preferred option

As noted in https://github.com/openwrt/openwrt/issues/21048, if the
ipv6_only_preferred option isn't set (or is set to zero), odhcpd will
still include the IPv6-Only Preferred option (with a zero value) in
DHCPv4 replies, while it should not return the option at all.

Closes: https://github.com/openwrt/openwrt/issues/21048
Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/341
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/dhcpv4.c